{% extends "system_setup/base.html" %}

{% block page_link %}
    <script src="../../static/system_setup/js/base.js"></script>
{% endblock %}

{% block style %}
    <style>
        .add_class {
            background: #1E90FF;
        }

        #add_order {
            float: right;
            height: 30px;
            margin-top: 5px;
            margin-right: 10px;
            background: #00a0e9;
            color: white;
            line-height: 14px;
            width: 80px;
            border: #00a0e9 solid 1px;
            border-radius: 3px;
            padding: 8px;
        }

        .top_tag {
            border-bottom: #01AAED solid 2px;
            color: #01AAED;
        }

        .tab_top {
            width: 100px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            display: inline-block;
            cursor: pointer;
        }
    </style>
{% endblock %}

{% block right_content %}
    <div class="headline">
        <div id="buy-process" onclick="change_mind(this.id)" class="tab_top top_tag">
            采购流程
        </div>

        <div id="apply-process" onclick="change_mind(this.id)" class="tab_top">
            申请流程
        </div>

        <div id="approver_but" style="float: right;width: 110px;height: 40px;text-align: center;">
            <a href="javascript:;" style="text-decoration: none;"
               onclick="admin_add('添加表单','define_produce_view.html','1200','800')"><span class="l" id="add_order">创建流程</span></a>
        </div>
    </div>

    <div id="buy-page" style="width: 100%;height: 94%;">
        <iframe id="implant_page" src="" frameborder="0" style="width: 100%; height: 100%"></iframe>
    </div>

{% endblock %}

{% block script %}
    <script type="text/javascript" src="../../static/system_setup/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="../../static/system_setup/js/H-ui.js"></script>
    <script type="text/javascript" src="../../static/system_setup/js/H-ui.admin.page.js"></script>
    <script type="text/javascript" src="../../static/system_setup/laypage/1.2/laypage.js"></script>
    <script>
        window.onload = function () {
            document.getElementById("loading").style.display = "none";
            document.getElementById("process-manage").style.display = "inline-block";
            document.getElementById("jiantou3").className = "iconfont icon-jiantou-xia";
            document.getElementById("product_process").className = "add_class";
            document.getElementById("system-management").className = "add-nav-active";
            document.getElementById('implant_page').src = "../personal-center/audit_form_deatil_view?process_name=purchase"
        }

        function change_mind(tag_id) {
            if (tag_id === "buy-process") {
                document.getElementById(tag_id).className = "tab_top top_tag";
                document.getElementById("apply-process").className = "tab_top";
                document.getElementById('implant_page').src = "../personal-center/audit_form_deatil_view?process_name=purchase"

            } else {
                document.getElementById(tag_id).className = "tab_top top_tag";
                document.getElementById("buy-process").className = "tab_top";
                document.getElementById('implant_page').src = "../personal-center/audit_form_deatil_view?process_name=apply"
            }
        }
    </script>
{% endblock %}